import { createRouter, createWebHashHistory } from "vue-router";
import HomeView from "../views/HomeView.vue";

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL as string),
  routes: [
    {
      path: "/",
      name: "guide",
      component: () => import("@/views/guideIndex.vue")
    },
    {
      path: "/main",
      name: "home",
      component: HomeView,
      children: [
        {
          path: "index",
          name: "index",
          // route level code-splitting
          // this generates a separate chunk (About.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import("@/views/Index.vue")
        },
        {
          path: "settings",
          name: "settings",
          // route level code-splitting
          // this generates a separate chunk (About.[hash].js) for this route
          // which is lazy-loaded when the route is visited.
          component: () => import("@/views/settingsView.vue")
        },
        {
          path: "date-converter",
          name: "dateConverter",
          component: () => import("@/views/dateConverter.vue")
        }
      ]
    }


  ]
});

export default router;
